{template "content","header"}
<?php
//会员组缓存
$group_cache = getcache('grouplist', 'member');
foreach($group_cache as $_key=>$_value) {
    if(intval($_value['issystem']) == 1) {
        continue;
    }
    $grouplist[$_key] = $_value['name'];
}
?>
<!-- 所在  -->
<div class="path-box wrap2 cl">
    <I class="icon home"></I>
    <span class="path"><a href="{siteurl($siteid)}">新疆维吾尔自治区林业规划院</a></span><span>&nbsp;&gt;&nbsp;</span>{catpos($catid)} 列表
</div>
<!-- 内容 -->
<div class="text-list wrap2 cl">
    <div class="inner">
        <!-- 子首页栏目1 -->					 
        <div class="tit cl">
            <div id="second_middle_list">
                <div>
                    <H2>{$CATEGORYS[$catid][catname]}</H2>
                    <SPAN class="more"><A href="index.php?m=formguide&c=index&a=show&formid=12&siteid=1&pc_hash=7KKSG7" target="_blank"><img style="vertical-align: middle;padding: 0 5px 0 0" src="{IMG_PATH}/icon/help.png"/>我要留言</A></SPAN>
                </div>
            </div>
        </div>
        {pc:get sql="SELECT * FROM cms_form_guestbook WHERE replay != ''" cache="3600" rows="10" page="$pages" return="data"}
        <table class="message-list">
            <tr>
                <th style="width:50px;">留言人</th>
                <th style="width:250px;">留言主题</th>
                <th style="width:100px;">留言时间</th>
                <th style="width:150px;">回复单位</th>
                <th style="width:100px;">回复时间</th>
                <th style="width:100px;">查看</th>
            </tr>
            {loop $data $r}
            <tr>
                <td>{$r[name]}</td>
                <td>{$r[subject]}</td>
                <td><SPAN class="date">{date('Y-m-d',$r[datetime])}</SPAN></td>
                <td>{$grouplist[$r[groupid]]}</td>
                <td><SPAN class="date">{date('Y-m-d',$r[replay_date])}</SPAN></td>
                <td>
                    <?php
                        if(empty($r[replay]) == false) {
                    ?>
                    <a href='javascript:view("{$r[replay]}");'>查看回复</a>
                    <?php
                    }
                    ?>
                </td>
            </tr>
            {/loop}
        </table>
        <div id="pages" class="text-c" style="width:100%;">{$pages}</div>
        {/pc}
        <BR>
    </div>
</div>

<link href="{CSS_PATH}dialog.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="{JS_PATH}dialog.js"></script>

<script type='text/javascript'>
    function view(content) {
        window.top.art.dialog({id: 'check'}).close();
        window.top.art.dialog({
            title: '查看回复内容', 
            id: 'check', 
            content: content, 
            width: '400px', 
            height: '250px',
            cancel: true,
            cancelVal: '关闭'
        });
    }
</script>

{template "content","footer"}